#include<iostream>
#include<cstdio>
#define N 10
using namespace std;
const long long inf=(long long)(1e18);
int read()
{
	char c=0;
	int sum=0;
	while (c<'0'||c>'9') c=getchar();
	while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
	return sum;
}
int n,m,q;
long long E[N+1][N+1],F[1<<N],dp[1<<N][N+1][2];
int main()
{
	freopen("journey.in","r",stdin);
	freopen("journey.ans","w",stdout);
	int x,y,z;
	n=read(),m=read(),q=read();
	for (int i=1;i<=n;++i)
		for (int j=1;j<=n;++j)
			E[i][j]=inf;
	for (int i=1;i<=m;++i) x=read(),y=read(),z=read(),E[x][y]=min(E[x][y],(long long)(z));
	while (q--)
	{
		x=read();
		for (int i=0;i<(1<<n);++i) F[i]=inf;
		F[0]=0;
		for (int w=1;w<=n;++w)
		{
			for (int i=0;i<(1<<n);++i)
				for (int j=1;j<=n;++j)
					dp[i][j][0]=dp[i][j][1]=inf;
			dp[1<<(w-1)][w][0]=0;
			for (int qt=1;qt<=n;++qt)
			{
				for (int i=0;i<(1<<n);++i)
					for (int j=1;j<=n;++j)
						for (int op=0;op<=1;++op)
							for (int k=1;k<=n;++k)
								dp[i|(1<<(k-1))][k][1]=min(dp[i|(1<<(k-1))][k][1],dp[i][j][op]+E[j][k]);
			}
			for (int i=0;i<(1<<n);++i)
			{
				F[i]=min(F[i],min(dp[i][w][0]+x,dp[i][w][1]));
				for (int j=1;j<=n;++j)
					if (j!=w)
						F[i]=min(F[i],dp[i][j][1]+x);
			}
		}
		for (int i=0;i<(1<<n);++i)
			for (int j=0;j<=i-1;++j)
				F[i|j]=min(F[i|j],F[i]+F[j]);
		printf("%lld\n",F[(1<<n)-1]);
	}
	return 0;
}
